package com.harvest.scientific.ladder

import android.app.Activity
import android.os.Bundle
import com.harvest.scientific.ladder.databinding.LayoutTestBinding
import com.harvest.scientific.ladder.ext.launchOnIO
import com.harvest.scientific.ladder.net.ReRsitory
import com.harvest.scientific.ladder.util.LogUtils

class MainActivity : Activity() {

    private lateinit var mBinding: LayoutTestBinding
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        mBinding = LayoutTestBinding.inflate(layoutInflater)
        setContentView(mBinding.root)
        mBinding.tvGetSms.setOnClickListener{
            launchOnIO{
                val cur = System.currentTimeMillis()
                val time=LogUtils.getSdf().format(cur)
                LogUtils.e("nihao $time")
//                test()
            }
        }
    }

    suspend fun test() {
        val request = ReRsitory()
        request.developBothTraining("18302035")
    }
}